package com.neu.fenli2023623.service.impl;

import com.neu.fenli2023623.entity.FeeDetails;
import com.neu.fenli2023623.entity.Mzxf;
import com.neu.fenli2023623.mapper.MzxfMapper;
import com.neu.fenli2023623.service.MzxfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class MzxfServiceImpl implements MzxfService {

    @Autowired
    private MzxfMapper mzxfMapper;

    @Override
    public List<Map<String, Object>> selectAll() {
        return mzxfMapper.selectAll();
    }
    public List<Map<String, Object>> selectByDateRange(String startDate, String endDate) {
        endDate =endDate+" 23:59:59";
        return mzxfMapper.selectByDateRange(startDate, endDate);
    }

    @Override
    public List<Map<String, Object>> selectByPatient(String patientName, String cardNumber) {
        return mzxfMapper.selectByPatient(patientName, cardNumber);
    }

    @Override
    public List<Map<String, Object>> selectByDateRangeOrPatient(String startDate, String endDate, String patientName, String cardNumber) {
        endDate =endDate+" 23:59:59";
        return mzxfMapper.selectByDateRangeOrPatient(startDate, endDate,patientName, cardNumber);
    }

    @Override
    public List<FeeDetails> selectProjectDetails(String mz_order_id) {

        return mzxfMapper.selectProjectDetails(mz_order_id);
    }

    @Override
    public int updateAddNote(Mzxf record) {
        return mzxfMapper.updateAddNote(record);
    }

}
